<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
  <title>Micro-Lab, Dendryt corporation</title>
  <%= javascript_include_tag :defaults, "code_highlighter/code_highlighter", "code_highlighter/ruby" %>
  <%= active_scaffold_includes %>
  <%= stylesheet_link_tag "reset", "main", :media => 'all' %>
  <!--[if IE]><%= stylesheet_link_tag "main-ie", :media => "all" %><![endif]-->
</head>
<body>
<div id="wrap">
  <div id="header"><h1>Micro-Lab, Dendryt corporation</h1>

    <h2 class="description">System Micro-Lab - przyszłosc polskiej reformy slużby zdrowia</h2>
    <ul id="nav">
      <% if current_user %>
      <!--Kierownik-->
      <% if detect_role 1 and !detect_role 2 and !detect_role 3 and !detect_role 4 and !detect_role 5%>
          <li><a href="http://localhost:3000/users">Zarządzanie Pracownikami</a></li>
      <% end %>
      <!--Recepcjonista-->
      <% if detect_role 2 and !detect_role 1 and !detect_role 3 and !detect_role 4 and !detect_role 5 %>
          <li><a href="http://localhost:3000/patient_datas">Zarządzanie Pacjentami</a></li>
          <li><a href="http://localhost:3000/order_examinations">Zarządzanie Zleceniami</a></li>
          <li><a href="http://localhost:3000/examination_resoults">Zarządzanie Wynikami</a></li>
      <% end %>
      <!--Technik-->
      <% if detect_role 3 and !detect_role 2 and !detect_role 1 and !detect_role 4 and !detect_role 5%>
          <li><a href="http://localhost:3000/order_examinations_for_technik">Zarządzanie Zleceniami</a></li>
          <li><a href="http://localhost:3000/examination_resoults">Zarządzanie Wynikami</a></li>
      <% end %>
      <!--Diagnosta Labolatoryjny-->
      <% if detect_role 4 and !detect_role 2 and !detect_role 3 and !detect_role 1 and !detect_role 5%>
          <li><a href="http://localhost:3000/order_examinations_for_technik">Zarządzanie Zleceniami</a></li>
          <li><a href="http://localhost:3000/examination_resoults">Zarządzanie Wynikami</a></li>
      <% end %>

      <!--Pielegniarka-->
      <!--
      <% if detect_role 5 and !detect_role 2 and !detect_role 3 and !detect_role 4 and !detect_role 1 %>-->

          <!--
      <% end %>-->
      <!--<li><a href="http://localhost:3000/users">Zarządzanie Pracownikami</a></li>-->
      <!--<li><a href="http://localhost:3000/patient_datas">Zarządzanie Pacjentami</a></li>-->
      <!--<li><a href="http://localhost:3000/order_examinations">Zarządzanie Zleceniami</a></li>-->
      <!--<li><a href="http://localhost:3000/order_examinations_for_technik">Zarządzanie Zleceniami(T,D)</a></li>-->
      <!--<li><a href="http://localhost:3000/examination_resoults">Zarządzanie Wynikami</a></li>-->
      <!--<li><a href="http://localhost:3000/examination_resoults_temp">Zarządzanie Wynikami temp</a></li>-->
      
 
          <li><%= link_to "Wyloguj", logout_path %></li>
      <% else %>
          <li> <%= link_to "Zaloguj", login_path %></li>
      <% end %>
      <div class="clear-fix"> </div>
    </ul>
     <% if current_user %>
    Zalogowano jako: <a id="login_up"><%=h current_user.login + ' : ' + current_user.first_name + ' ' + current_user.last_name  %></a>
    <% end %>
  </div>

  <div id="sub-nav">
    <%= yield %>

  </div>
</div>
</body>
</html>

